﻿using System;
using System.Collections.Generic;
using System.Text;

namespace openxmlconv
{
    public class Style
    {
        private string name;
        private string family;
        private string parentStyle;
        private string fontName;
        private int fontSize = 11;
        private bool isBold = false;
        private bool isItalic = false;
        private bool isUnderline = false;
        private string alignment;

        protected Style()
        {
            this.name = "name";
            this.family = "family";
            this.parentStyle = "parent-style";
        }

        public static Style create(string name, string family, string parentStyle)
        {
            return new Style(name, family, parentStyle);
        }
        public override bool Equals(object obj)
        {
            Style s = (Style)obj;
            if (s.getName() != name)
                return false;
            else if (s.getFamily() != family)
                return false;
            else if (s.getParentStyle() != parentStyle)
                return false;
            else return true;
        }
        private string getParentStyle()
        {
            return parentStyle;
        }
        private string getFamily()
        {
            return family;
        }
        public string getName()
        {
            return name;
        }
        private Style(string name, string family, string parentStyle)
        {
            this.name = name;
            this.family = family;
            this.parentStyle = parentStyle;
        }
        internal void setBold()
        {
            isBold = true;
        }
        public bool getBold()
        {
            return isBold;
        }
        public bool getItalic()
        {
            return isItalic;
        }
        public void setItalic()
        {
            isItalic = true;
        }
        internal bool getUnderline()
        {
            return isUnderline;
        }
        internal void setUnderline()
        {
            isUnderline = true;
        }
        internal string getFontName()
        {
            return fontName;
        }
        internal void setFontName(string p)
        {
            fontName = p;
        }
        internal int getFontSize()
        {
            return fontSize;
        }
        internal void setFontSize(int size)
        {
            fontSize = size;
        }
        internal string getAlignment()
        {
            return alignment;
        }
        internal void setAlignment(string a)
        {
            this.alignment = a;
        }
    }
}
